import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:share_fit/app/components/back_btn_icon.dart';
import 'package:share_fit/app/helper/ext/tr_ext.dart';
import 'package:share_fit/generated/locales.g.dart';

import 'contacts_logic.dart';

class ContactsPage extends StatelessWidget {
  ContactsPage({super.key});

  final logic = Get.find<ContactsLogic>();
  final state = Get.find<ContactsLogic>().state;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        leading: BackBtnIcon(onTap: () => Get.back()),
        centerTitle: true,
        title: Text(LocaleKeys.settings_contacts.ts, style: TextStyle(fontSize: 54.sp)),
      ),
      body: Padding(
        padding: EdgeInsets.only(left: 43.w, right: 43.w),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            SizedBox(height: 100.h),
            Image.asset('assets/images/device/ic_contacts_1.png', width: 737.w, height: 290.h),
            SizedBox(height: 70.h),
            Text(LocaleKeys.contact_sync_text1.ts, style: TextStyle(fontSize: 42.sp)),
            SizedBox(height: 10.h),
            Text(LocaleKeys.contact_sync_text2.ts, style: TextStyle(fontSize: 42.sp)),
            SizedBox(height: 70.h),
            Container(
              // height: 425.h,
              width: 1040.w,
              padding: EdgeInsets.only(top: 42.h, left: 63.w, bottom: 50.w),
              decoration: BoxDecoration(color: Colors.white70.withOpacity(0.9), borderRadius: BorderRadius.circular(60.r)),
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  Text(LocaleKeys.contact_sync_flow.ts, style: TextStyle(fontSize: 54.sp)),
                  SizedBox(height: 50.h),
                  Text(LocaleKeys.contact_sync_flow_text1.ts, style: TextStyle(fontSize: 42.sp)),
                  SizedBox(height: 10.h),
                  Text(LocaleKeys.contact_sync_flow_text2.ts, style: TextStyle(fontSize: 42.sp)),
                  SizedBox(height: 10.h),
                  Text(LocaleKeys.contact_sync_flow_text3.ts, style: TextStyle(fontSize: 42.sp)),
                ],
              ),
            ),
            SizedBox(height: 162.h),
            GestureDetector(
              // onTap: logic.goImportContactsPage(),
              onTap: () => { Get.toNamed('/device/settings/contacts/import')},
              child: Container(
                alignment: Alignment.center,
                height: 146.h,
                width: 1040.w,
                decoration: BoxDecoration(color: Colors.red.withOpacity(0.9), borderRadius: BorderRadius.circular(60.r)),
                child: Text(LocaleKeys.open.ts, style: TextStyle(fontSize: 48.sp, color: Colors.white)),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
